function request(url, data, res, method) {
	let header = method == 'POST' ? {
		'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
		Accept: 'application/json, text/javascript, */*; q=0.01'
	} : {
		'token': uni.getStorageSync('token')
	};
	uni.request({
		url: "http://localhost:8080" + url,
		method,
		header,
		data,
		Token: '2499c60c3c05be53288f2a03c3df9fa0',
		success: (data) => {
			uni.hideLoading()
			res(data.data)
		},
		fail(err) {
			uni.hideLoading()
			console.log(err)
		}
	});
}

export default request;